﻿using System.Configuration;

namespace SvnDeploy.Service.Cfg
{
    public class ApplicationCollection : ConfigurationElementCollection
    {
        public void Add(ApplicationElement applicationElement)
        {
            BaseAdd(applicationElement);
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new ApplicationElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ApplicationElement)element).Name;
        }

        public ApplicationElement this[int index]
        {
            get { return BaseGet(index) as ApplicationElement; }
        }
    }
}
